package cn.edu.scau.cmi.xiaozecheng.abstractFactory.factory;

import cn.edu.scau.cmi.xiaozecheng.abstractFactory.domainAbstractClass.Meat;

/**
 * @author xiao
 * @date 2019/10/13/013 1:20 PM
 */
public abstract class AbstractFactory {
    static AbstractFactory getFactory(String brand) {
        switch (brand) {
            case "Wens":
                return new WensFactory();
            case "Tianbang":
                return new TianbangFactory();
            case "Aonong":
                return new AonongFactory();
            default:
                throw new RuntimeException("没有该公司");
        }
    }
    public abstract Meat createBeef();
    public abstract Meat createChicken();
    public abstract Meat createPork();
}
